<head>
    <style type="text/css">
        .style1 {
            border-width: 1px;
        }
        .style2 {
            border-collapse: collapse;
            border-style: solid;
            border-width: 1px;
        }
        .style3 {
            text-align: center;
            border-width: 1px;
        }
    </style>
</head>
<?php
include_once('Mysql_connect.inc');//启动连接，连接名：$conn
?>
<table class="style2" style="width: 100%">
    <tr>
        <td class="style3" style="height: 21px">ISBN</td>
        <td class="style3" style="height: 21px">Title</td>
        <td class="style3" style="height: 21px">Author</td>
        <td class="style3" style="height: 21px">Type</td>
        <td class="style3" style="height: 21px">Price</td>
        <td class="style3" style="height: 21px">Press</td>
    </tr>
    <?php
    $result = mysqli_query($conn, 'SELECT * FROM book');
    while (($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) != NULL) {
        ?>
    <tr>
        <td class="style3" style="height: 21px"><a href="test3.php?isbn=<?php echo $row['isbn'];?>"><?php echo $row['isbn'];?></a></td>
        <td class="style3" style="height: 21px"><?php echo $row['title'];?></td>
        <td class="style3" style="height: 21px"><?php echo $row['author'];?></td>
        <td class="style3" style="height: 21px"><?php echo $row['type'];?></td>
        <td class="style3" style="height: 21px"><?php echo $row['price'];?></td>
        <td class="style3" style="height: 21px"><?php echo $row['press'];?></td>
   </tr>
    <?php
} 
mysqli_free_result($result);
?>
</table>
<?php
include_once('Mysql_unconnect.inc'); //断开连接
?>

